/*
 * Copyright (c) 1994-2022, The FreeBSD Documentation Project
 * Copyright (c) 2021-2022, Sergio Carlavilla <carlavilla@FreeBSD.org>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 */

footer {
  margin-top: 1rem;
  padding: 1rem;
  color: var(--global-font-color);
  background-color: var(--footer-background-color);
}

.footer-container {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  grid-template-areas:
    "logo"
    "about"
    "documentation"
    "community"
    "legal"
    "copyright";
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.logo-column {
  grid-area: logo;
}

.about-column {
  grid-area: about;
}

.community-column {
  grid-area: community;
}

.documentation-column {
  grid-area: documentation;
}

.legal-column {
  grid-area: legal;
}

.copyright-column {
  grid-area: copyright;
  padding-top: 1rem;
  border-top: 1px solid #E5E7EB;
  line-height: 1rem;
  font-size: .8rem;
}

.column-title {
  margin-top: 0;
  font-size: inherit;
  border-bottom: none;
}

.column-elements-container {
  margin: .5rem 0;
  padding: 0;
  list-style: none;
}

.column-elements-container li {
  margin-top: .7rem;
}

.column-element {
  text-decoration: none;
  line-height: 2rem;
  color: inherit;
  font-size: inherit;
}

.heart {
  font-size: 1.2rem;
  color: #E38582;
}

.heart:hover {
  color: #D1332E;
}

.options-container {
  display: flex;
  align-items: center;
}

.theme-container {
  display: none;
  margin-left: 2rem;
}

.theme-container select {
  border: 1px solid #CCC;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: #FCFCFD;
  color: #444;
}

.language-container {
  display: flex;
  align-items: center;
}

.language-container a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--global-font-color);
  border-radius: 1px;
  padding: .3rem;
}

.language-container a img {
  display: inline-flex;
  padding-right: 10px;
  align-items: center;
  justify-content: center;
  height: 1.5rem;
  width: 1.5rem;
}

@media screen and (min-width: 450px) {
  .footer-container {
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logo logo"
      "about community"
      "documentation legal"
      "copyright copyright";
  }
}

@media screen and (min-width: 900px) {
  footer {
    padding: 2rem;
  }

  .footer-container {
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    grid-template-areas:
      "logo about documentation community legal"
      "copyright copyright copyright copyright copyright";
    gap: 1rem;
  }
}

@media screen and (min-width: 1451px) {
  footer {
    padding: 2rem 5rem;
  }

  .footer-container {
    gap: 2rem;
  }
}
